CompTIA XK0-005 CompTIA Linux+ Exam CompTIA XK0-005 Exam Dumps [2022] - Right XK0-005 Study Materials Online 1. A Linux administrator is alerted to a storage capacity issue on a server without a specific mount point or directory . Which of the following commands would be MOST helpful for troubleshooting? (Choose two.) A. parted B. df C. mount D. du E. fdisk F. dd G. ls Answer: B,D 2. A Linux user reported the following error after trying to connect to the system remotely: ssh: connect to host 10.0. 1. 10 port 22: Resource temporarily unavailable The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue: Which of the following commands will resolve this issue? A. firewall-cmd --zone=public --permanent --add-service=22 B. systemctl enable firewalld; systemctl restart firewalld C. firewall-cmd --zone=public --permanent --add-service=ssh D. firewall-cmd --zone=public --permanent --add-port=22/udp CompTIA XK0-005 Exam Dumps [2022] - Right XK0-005 Study Materials Online Answer: C 3. A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container . Which of the following commands will help to accomplish this task? A. docker images prune -a B. docker push images -a C. docker rmi -a images D. docker images rmi --all Answer: A 4. Which of the following commands will display the operating system? A. uname -n B. uname -s C. uname -o D. uname -m Answer: C 5. A systems administrator created a web server for the company and is required to add a tag for the API so end users can connect . Which of the following would the administrator do to complete this requirement? A. hostnamectl status --no-ask-password B. hostnamectl set-hostname "$(perl -le "print" "A" x 86)" C. hostnamectl set-hostname Comptia-WebNode -H root@192.168.2.14 D. hostnamectl set-hostname Comptia-WebNode --transient Answer: C 3 1. A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection. Given the following output: Which of the following commands would resolve the issue and allow an SSH connection to be established without a password? A. restorecon -rv .ssh/authorized_key B. mv .ssh/authorized_key .ssh/authorized_keys CompTIA XK0-005 Exam Dumps [2022] - Right XK0-005 Study Materials Online C. systemctl restart sshd.service D. chmod 600 mv .ssh/authorized_key Answer: B 6. Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5. 1. Which of the following commands should the administrator run to achieve this goal? A. route -i etho -p add 10.0.213.5 10.0.5.1 B. route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1" C. echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route D. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0 Answer: D 7. A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner . Which of the following commands will satisfy this requirement? A. chown web:web /home/web B. chmod -R 400 /home/web C. echo "umask 377" >> /home/web/.bashrc D. setfacl read /home/web Answer: B 8.1.A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed? A. nslookup B. rsyn C. netstat D. host Answer: A 9. A Linux administrator copied a Git repository locally, created a feature branch, and committed some changes to the feature branch . Which of the following Git actions should the Linux administrator use to publish the changes to the main branch of the remote repository? A. rebase B. tag C. commit D. push CompTIA XK0-005 Exam Dumps [2022] - Right XK0-005 Study Materials Online Answer: C 10. A systems administrator is tasked with installing GRUB on the legacy MBR of the SATA hard drive . Which of the following commands will help the administrator accomplish this task? A. grub-install /dev/hda B. grub-install /dev/sda C. grub-install /dev/sr0 D. grub-install /dev/hd0,0 Answer: B 11. After installing some RPM packages, a systems administrator discovers the last package that was installed was not needed . Which of the following commands can be used to remove the package? A. dnf remove packagename B. apt-get remove packagename C. rpm -i packagename D. apt remove packagename Answer: A 12. A Linux system is failing to start due to issues with several critical system processes . Which of the following options can be used to boot the system into the single user mode? (Choose two.) A. Execute the following command from the GRUB rescue shell: mount -o remount, ro/sysroot. B. Interrupt the boot process in the GRUB menu and add systemd.unit=single in the kernel line. C. Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line. D. Interrupt the boot process in the GRUB menu and add single=user in the kernel line. E. Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line. F. Interrupt the boot process in the GRUB menu and add systemd.unit=single.target in the kernel line. Answer: C,E CompTIA XK0-005 Exam Dumps [2022] - Right XK0-005 Study Materials Online 13. A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file . Which of the following commands will accomplish this task? A. xargs -f cat toDelete.txt -rm B. rm -d -r -f toDelete.txt C. cat toDelete.txt | rm -frd D. cat toDelete.txt | xargs rm -rf Answer: B 14. Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided: Which of the following commands should the administrator use to diagnose the issue? A. df -i /oracle1 B. fdisk -1 /dev/sdb1 C. lsblk /dev/sdb1 D. du -sh /oracle1 Answer: A 15. A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work . Which of the following should be executed FIRST? A. source ~/.bashrc B. read ~/.bashrc C. touch ~/.bashrc D. echo ~/.bashrc Answer: A 16. A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands: Which of the following commands will BEST resolve this issue? A. sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config B. restorecon -R -v /var/www/html C. setenforce 0 D. setsebool -P httpd_can_network_connect_db on Answer: B 17. A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log . Which of the following will execute the command? A. tail -v 20 B. tail -n 20 C. tail -c 20 D. tail -l 20 Answer: B Test XK0-005